package com.quickcode.example.threadpool;

import lombok.extern.slf4j.Slf4j;

import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by 张波 on 2019/10/25.
 */
@Slf4j
public class TimerExample {

    public static void main(String[] args) {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                log.info("runing");
            }
        },1000,2000);
    }
}
